package com.dfbz.设计模式.decorate;

/**
 * 增强的学生  接口
 */
public class StudentCast implements Coder,LookBook{

    private Student student;

    public StudentCast (Student student){
        this.student=student;
    }

    public void study(){

        // 保留原有的功能
        student.study();

        System.out.println("SpringMVC");
        System.out.println("SpringBoot");
        System.out.println("SpringCloud");
    }


    @Override
    public void lookBook() {
        // 保留原有功能
        student.lookBook();
        System.out.println("红楼梦");
        System.out.println("水浒传");
    }
}
